module.exports = {
  port: 8888,
  locales: {
    '/': {
      lang: 'zh-CN',
      title: '工地防治统计系统',
      description: '🛠️ Vue.js 开发的标准工具'
    }
  },
  head: [
    ['link', { rel: 'icon', href: '/favicon.png' }],
    ['link', { rel: 'manifest', href: '/manifest.json' }],
    ['meta', { name: 'theme-color', content: '#3eaf7c' }],
    ['meta', { name: 'apple-mobile-web-app-capable', content: 'yes' }],
    ['meta', { name: 'apple-mobile-web-app-status-bar-style', content: 'black' }],
    ['link', { rel: 'apple-touch-icon', href: `/icons/apple-touch-icon-152x152.png` }],
    ['link', { rel: 'mask-icon', href: '/icons/safari-pinned-tab.svg', color: '#3eaf7c' }],
    ['meta', { name: 'msapplication-TileImage', content: '/icons/msapplication-icon-144x144.png' }],
    ['meta', { name: 'msapplication-TileColor', content: '#000000' }]
  ],
  plugins: {
    '@vuepress/pwa': {
      serviceWorker: true,
      updatePopup: {
        '/': {
          message: "发现新内容可用",
          buttonText: "刷新"
        }
      }
    }
  },
  theme: '@vuepress/theme-vue',
  themeConfig: {
    repo: '',
    docsDir: 'docs',
    docsBranch: 'next',
    editLinks: false,
    lastUpdated: 'Last Updated',
    sidebarDepth: 3,
    algolia: {
      indexName: 'cli_vuejs',
      apiKey: 'f6df220f7d246aff64a56300b7f19f21',
    },
    locales: {
      '/': {
        label: '简体中文',
        selectText: '选择语言',
        lastUpdated: '上次编辑时间',
        editLinkText: '在 GitHub 上编辑此页',
        nav: [
          {
            text: '指南',
            link: '/guide/'
          }
        ],
        sidebar: {
          '/guide/': [
            '/guide/',
            {
              title: '基础',
              collapsable: true,
              children: [
                '/guide/layout',
                '/guide/new-page',
                '/guide/style',
                '/guide/server'
              ]
            },
            {
              title: '开发',
              collapsable: true,
              children: [
                '/guide/eslint',
                '/guide/git-hook',
                '/guide/style-guide',
                '/guide/build-targets',
                '/guide/deployment'
              ]
            }
          ]
        }
      }
    }
  }
}
